function rem(){
  var html = document.documentElement;
  var cw = html.clientWidth;

  html.style.fontSize = cw / 100 +'px';
}
rem();
document.onready = rem;
window.onresize = rem;
